]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
theme: Simplify .search-section-content items styling
authornana-4 <hnmaigo@gmail.com>
Sat, 25 Jan 2020 09:11:28 +0000 (18:11 +0900)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 6 Feb 2020 20:31:42 +0000 (20:31 +0000)
This reduces duplicate code in .search-provider-icon and
.list-search-result by using %search-section-content-item
to improve maintainability.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/957

data/theme/gnome-shell-sass/widgets/_search-results.scss

index 1c53abfc2d0baac7a3f27ddfbea243a8db7725e1..b067f477638af0915d2c082b5eae1ef323b39af8 100644 (file)
   spacing: 0;
 }
 
+%search-section-content-item {
+  @extend %icon_tile;
+
+  &:focus,
+  &:hover,
+  &:selected {
+    background-color: transparentize($osd_fg_color, .9);
+    transition-duration: 200ms;
+  }
+
+  &:active,
+  &:checked {
+    background-color: transparentize(darken($osd_bg_color, 10%), .1);
+  }
+}
+
 // "no results" text
 .search-statustext {
   @extend %status_text;
 
 // search result provider
 .search-provider-icon {
-  @extend %icon_tile;
-
-  padding: $base_padding;
-  spacing: 0;
+  @extend %search-section-content-item;
   margin-right: $base_margin * 2;
 
-  &:focus,
-  &:selected,
-  &:hover {
-    background-color: transparentize($osd_fg_color,.9);
-    transition-duration: 200ms;
-  }
-
-  &:active,
-  &:checked {
-    background-color: transparentize(darken($osd_bg_color,10%),.1);
-  }
-
   // content
   .list-search-provider-content {
     spacing: $base_spacing * 2;
 
 // search result listitem
 .list-search-result {
-  @extend %icon_tile;
-  spacing: 0;
-  padding: $base_padding;
-  color: $osd_fg_color;
-
-  border-radius: $base_border_radius + 2px;
-
-  &:focus,
-  &:selected,
-  &:hover {
-    background-color: transparentize($osd_fg_color,.9);
-    transition-duration: 200ms;
-  }
-  &:active,
-  &:checked {
-    background-color: transparentize(darken($osd_bg_color,10%),.1);
-  }
+  @extend %search-section-content-item;
 
   // content
   .list-search-result-content {
 
   // list item title
   .list-search-result-title {
-    color: $osd_fg_color;
     spacing: $base_spacing * 2;
     padding-right: $base_padding;
     // font-weight: bold;